<template>
  <el-avatar shape="square" :size="100" :fit="img.fit" :src="img.url" />
</template>

<script>
import _ from "lodash";
export default {
  name: "img_index",
  props: {
    RHImg: {
      type: Object
    }
  },
  data() {
    return {
      img: {
        //['fill', 'contain', 'cover', 'none', 'scale-down']
        fit: "fill",
        url: null
      }
    };
  },
  methods: {
    initialize() {
      this.img = _.defaultsDeep(this.RHImg, this.img);
    }
  },
  created() {
    this.initialize();
  }
};
</script>

<style scoped></style>
